<?php
class BeautyshowAction extends Action
{
	public function index(){
		$f = isset($_GET['f'])?$_GET['f']:'beautyshow';
		$s = isset($_GET['s'])?$_GET['s']:'';
		$pic_dir = 'Public/uploads/'.$f.'/';
		if($s){
			$pic_dir .= $s;
			$this->assign('s',$s);
			$files_arr = getDir2($pic_dir);
			$this->assign('pic_dir',$pic_dir);
			$this->assign('files_arr',$files_arr);
		} else {
			$cover_pics = getPicDir2();
			$cover_pics = (array)$cover_pics['beautyshow'];
			$this->assign('cover_pics', $cover_pics);
		}
		$this->display(); 
	}
	public function browse(){
		$f = isset($_GET['f'])?$_GET['f']:'beautyshow';
		$s = isset($_GET['s'])?$_GET['s']:'ancient';
		$i = isset($_GET['i'])?$_GET['i']:'';
		$pic_dir = 'Public/uploads/'.$f.'/'.$s;
		$files_arr = getDir2($pic_dir); 
		$coverpic = $files_arr[0];
		unset($files_arr[0]);
		$this->assign('f',$f);
		$this->assign('s',$s);
		$this->assign('i',$i);
		$this->assign('files_arr',$files_arr);
		$this->assign('coverpic',$coverpic);
		$this->display();
	}
}
?>